package com.koron.operation.classes.shift.feign;

import com.koron.bean.base.Response;
import com.koron.bean.scheduleShift.ScheduleShift;
import com.koron.common.core.feignConfig.FeignFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 查询工单
 * @author jzp
 * @since 2021/10/29
 */
@Service
@FeignClient(value = "eam-service-order", fallbackFactory = FeignFallbackFactory.class)
public interface OrderFeignService {
    /**
     * 查询检修申请工单list
     */
    @GetMapping("application/list")
    Response<Object> appList(@RequestParam("staffs") List<String> staffs,
                        @RequestParam("startTime") String startTime);

    /**
     * 查询普通工单list
     */
    @GetMapping("orderAll/queryListNoMerge")
    Response<Object> orderList(@RequestParam("accountList") List<String> staffs,
                        @RequestParam("startTime") String startTime);

    /**
     * 查询巡视工单list
     */
    @GetMapping("patrol/baseInfo/queryList")
    Response<Object> patrolList(@RequestParam("accountList") List<String> staffs,
                          @RequestParam("startTime") String startTime);

    /**
     * 修改巡视工单 自动巡视 的巡视人员
     */
    @PostMapping("patrol/baseInfo/updatePatrolStaff")
    Response<Object> updatePatrolStaff(@RequestBody ScheduleShift scheduleShift);

}
